﻿CREATE PROCEDURE [ServiceEngine].[GetSystem]
	@ID uniqueidentifier
AS
BEGIN
	SET NOCOUNT ON;

	SELECT	N.[EntityID] as SystemID, N.[EntityName] as [Name], S.OwnerName, S.Location, N.EntityDescription as Description, S.OwnerContact, S.PolicyID, S.URI
	FROM	[ServiceEngine].Systems S
	JOIN	[ServiceEngine].Names N on N.[EntityID] = S.SystemID and N.[EntityTypeID] = 12
	WHERE	S.SystemID = @ID

END